import { Module } from '@nestjs/common';
import { APP_FILTER, APP_INTERCEPTOR } from '@nestjs/core';
import { CrawlerModule } from './modules/crawler/crawler.module';
import { MovieTagModule } from './modules/movieTag/movieTag.module';
import { MovieListModule } from './modules/movieList/movieList.module';
import { AxiosModuleModule } from './modules/axiosModule/axiosModule.module';
import { ShareModule } from './modules/share/share.module';
import { LoggerModule } from './modules/logger/logger.module';
import { ResponseInterceptor } from './middlerwares/response.interceptor';
import { GlobalExceptionFilter } from './middlerwares/exception.filter';
import { StatisticsModule } from './modules/statistics/statistics.module';





@Module({
  imports: [
    ShareModule,
    CrawlerModule,
    MovieTagModule,
    MovieListModule,
    AxiosModuleModule,
    LoggerModule,
    StatisticsModule
  ],
  providers: [
    {
      provide: APP_INTERCEPTOR,
      useClass: ResponseInterceptor,
    },
    {
      provide: APP_FILTER,
      useClass: GlobalExceptionFilter,
    },
  ],
  controllers: [],
})
export class AppModule {}
